package com.luck.email;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.HashMap;
import java.util.Map;

@RunWith(SpringRunner.class)
@SpringBootTest
public class TestEmail {
    @Autowired
    private MailApi mailApi;

    @Test
    public void amil(){
        String content = "<html>\n" +
                "<body>\n" +
                "<h3>hello world,这是一封HTML邮件！</h3>\n" +
                "</body>\n" +
                "</htmL>";
        Map map = new HashMap<>();
        map.put("name", "shuaige");
        mailApi.sendMailTemplate("410436159@qq.com","test", "mailTemplate.ftl", map );
    }
}
